package designpattern.command18.command_first;

/**
 * Created by JohnSun on 2017/6/28.
 */

public class Test {
    public void test(){

        //层次性；
        SimpleRemoteControl simpleRemoteControl=new SimpleRemoteControl();
        Light light=new Light();
        LightOnCommand lightOnCommand=new LightOnCommand(light);
        simpleRemoteControl.setCommand(lightOnCommand);
        simpleRemoteControl.buttonWasPressed();


    }

}
